package com.ly.cola.handler;

import com.alibaba.cola.dto.Response;
import com.alibaba.cola.event.EventHandler;
import com.alibaba.cola.event.EventHandlerI;
import com.alibaba.fastjson.JSON;
import com.ly.cola.entity.EventEntity;
import lombok.extern.slf4j.Slf4j;

/**
 * @Author LY
 * @create 2024/1/15 18:45
 * @Description 接收活动事件
 */
@Slf4j
@EventHandler
public class ColaEventHandler implements EventHandlerI<Response, EventEntity> {

    @Override
    public Response execute(EventEntity eventEntity) {
        log.info("ColaEventHandler|接收活动事件|{}", JSON.toJSON(eventEntity));
        return Response.buildSuccess();
    }
}
